/*
 * @Author: 专送Pro
 * @Date: 2019-08-23 13:17:18
 * @LastEditors  : wuzhen
 * @LastEditTime : 2020-01-11 13:13:28
 * @Description: 配置文件
 */
/* eslint-disable */
export default {
  data() {
    return {
      columns: [
        {
          title: "好友ID",
          width: 120,
          key: "friendid"
        },
        {
          title: "好友昵称",
          key: "friendname"
        },
        {
          title: "加好友方式",
          render: (h, params) => {
            const row = params.row;
            return h(
              "span",
              row.invitetype === 10
                ? "手机搜索"
                : row.invitetype === 20
                ? "扫二维码"
                : row.invitetype === 30
                ? "ID添加"
                : "--"
            );
          }
        },
        {
          title: "好友关系",
          render: (h, params) => {
            const row = params.row;
            return h(
              "span",
              row.relationship === 10
                ? "黑名单"
                : row.relationship === 20
                ? "好友"
                : row.relationship === 30
                ? "陌生人"
                : "--"
            );
          }
        },
        {
          title: "是否拉黑",
          render: (h, params) => {
            const row = params.row;
            return h(
              "Tag",
              {
                props: {
                  color: String(row.relationship).startsWith("1")
                    ? "error"
                    : "success"
                }
              },
              String(row.relationship).startsWith("1") ? "是" : "否"
            );
          }
        },
        {
          title: "是否消息免打扰",
          render: (h, params) => {
            const row = params.row;
            return h(
              "Tag",
              {
                props: {
                  color: String(row.syssetting).startsWith("1")
                    ? "error"
                    : "success"
                }
              },
              String(row.syssetting).startsWith("1") ? "是" : "否"
            );
          }
        },
        {
          title: "登录状态",
          render: (h, params) => {
            const row = params.row;
            return h("Badge", {
              props: {
                status: row.onlinestatus === 20 ? "processing" : "default",
                text: row.onlinestatus === 20 ? "在线" : "离线"
              }
            });
          }
        },
        {
          title: "成为好友时间",
          render: (h, params) => {
            const row = params.row;
            return h("span", this.$fmtMoment(row.createtime) || "--");
          }
        },
        {
          title: "操作",
          slot: "action"
        }
      ],
      handleBtn: [
        {
          slot: "action",
          btnType: "action"
        }
      ]
    };
  }
};
